<div style="font-size:16px;font-weight:bold;padding:10px;margin:10px 0"><a href="cart_admin.html">QUẢN TRỊ ĐƠN HÀNG</a></div>
  
<table cellSpacing="1" cellPadding="5" width="100%" border="0" >
        <tr align="left">
            <td width="12%" align="right" bgcolor="#FFFFFF" ><strong>B&#7855;t đầu tạo từ</strong></td>
          <td width="20%" bgcolor="#FFFFFF"><input type="text" style="height:20px " value="{$date_begin}" name="date_begin" size="" id="date_begin" maxlength="10" >
          <span class="smalldetailnew">&nbsp;dd-mm-yyyy</span></td>
            <td width="4%" align="right" bgcolor="#FFFFFF"><strong>Đến</strong></td>
            <td width="64%" bgcolor="#FFFFFF"><input type="text" value="{$date_end}" style="height:20px " name="date_end" size="" id="date_end" maxlength="10" />
          <span class="smalldetailnew">&nbsp;dd-mm-yyyy</span></td>
        </tr>
        <tr align="left">
            <td align="right" bgcolor="#FFFFFF" ><strong>Tr&#7841;ng th&aacute;i</strong></td>
          <td bgcolor="#FFFFFF">
            <select name="status_select">
              {$status_option}
            </select>
            </td>
            <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
            <td align="left" bgcolor="#FFFFFF"><input name="ListNews" type="submit" value="T&igrave;m ki&#7871;m" class="button" /></td>
        </tr>
        <tr align="left">
            <td colspan="4" align="left" bgcolor="#FFFFFF">{$msg}</td>
        </tr>
</table>
      
{if $all_carts}
{$paging}
    <table width="100%" cellspacing="1" cellpadding="5"  bgcolor="#6BE465">
  		<tr>
		  <td width="3%" bgcolor="#FFFF66" id="title_admin"><input name="select_all" onclick="selectAll('delete_id');" type="checkbox" id="select_all" value="1"/></td>
		  <td width="10%" bgcolor="#FFFF66" id="title_admin">Mã giỏ hàng</td>
		  <td width="17%" bgcolor="#FFFF66" id="title_admin"><strong>UserID</strong></td>
			<td width="17%" bgcolor="#FFFF66" id="title_admin"><strong>Người dùng</strong></td>
			<td width="11%" align="right" bgcolor="#FFFF66" id="title_admin"><strong>Thời gian tạo</strong></td>
			<td width="12%" bgcolor="#FFFF66" id="title_admin"><strong>Thời gian cập nhật</strong></td>
			<td width="14%" bgcolor="#FFFF66" id="title_admin"><strong>IP</strong></td>
			<td width="14%" align="center" bgcolor="#FFFF66" id="title_admin"><strong>Giá (VNĐ)</strong></td>
			<td width="14%" align="center" bgcolor="#FFFF66" id="title_admin"><strong>Số lượng (Sản phẩm)</strong></td>
            <td width="14%" align="center" bgcolor="#FFFF66" id="title_admin"><strong>Trạng thái</strong></td>
          <td width="19%" align="center" bgcolor="#FFFF66" id="title_admin">&nbsp;</td>
		</tr>    
		{foreach from=$all_carts item=item}
		<tr  bgcolor="#Ffffff">
		  <td><input style="cursor:pointer;" name="delete_id[]" type="checkbox" id="delete_id[]" value="{$item.id}"/></td>
		  <td>{$item.id}</td>
		  <td>{$item.user_id}</td>
			<td><a href="{$item.user_name}">{if $item.user_id}{$item.user_name}{else}Khách{/if}</a></td>
	  	  <td align="right" bgcolor="#Ffffff">{$item.time_create}</td>
            <td align="right" bgcolor="#Ffffff">{$item.time_change}</td>
			<td bgcolor="#Ffffff">{$item.ip}</td>
			<td align="center" bgcolor="#Ffffff">{$item.price}</td>
			<td align="center" bgcolor="#Ffffff">{$item.quantity}</td>
	        <td align="center" bgcolor="#Ffffff">{$item.status}</td>
	        <td align="center" nowrap="nowrap" bgcolor="#Ffffff">[ <a href="{$item.url}">Xem &amp; Sửa</a> ] {if $is_admin} [ <a href="{$item.delete}">Xóa</a> ] {/if}</td>
		</tr> 
        {/foreach}
         <tr>
           <td colspan="11" id="title_admin3">
           <input name="submit" type="submit" id="submit" value="Xóa" />           </td>
         </tr>
    </table>	
{$paging}
{else}
    <center>
      Chưa có đơn hàng nào!
    </center>
{/if}

<script>
{literal}
jQuery(document).ready(function(){								
	jQuery("#date_begin").datepicker();
	jQuery("#date_end").datepicker();
});
{/literal}
</script>